<template>
  <div class="list">
    <div class="list-item" v-for="(item,index) in list">
      <div class="box-item">
        <el-card class="box-card">
          <el-row>
            <el-col :span="8">
              <div style="width: 150px; height: 201px;">
                <img :src="item.main_image" style="object-fit: cover;width: 100%;height: 100%;" />
              </div>
            </el-col>
            <el-col :span="16">
              <div>
                <el-row class="goods-info goods-title">{{item.name}}</el-row>
                <el-row class="goods-info">
                  <el-col :span="12">
                    <span>游戏编码：</span>
                    <span style>{{item.code}}</span>
                  </el-col>
                  <el-col :span="12">
                    <span>文件大小：</span>
                    <span style>未知</span>
                  </el-col>
                </el-row>
                <el-row class="goods-info">
                  <el-col :span="12">
                    <span>游戏语言：</span>
                    <span style>简体中文</span>
                  </el-col>
                  <el-col :span="12">
                    <span>推荐评分：</span>
                    <span style>{{item.rate_score}}分</span>
                  </el-col>
                </el-row>
                <el-row class="goods-info">
                  <el-col :span="24">
                    <span>游戏类型：</span>
                    <span style>{{item.category.replace("游戏 / ","")}}</span>
                  </el-col>
                </el-row>
                <!--  -->
                <el-row style="margin-top:50px;">
                  <el-col :span="8">
                    <div  class="detail-text" style="float:left;" @click="handleOpenUrl(item.home_page)">查看详情</div>
                  </el-col>
                  <el-col :span="8">
                    <div  class="detail-text" style="float:left;" @click="handleOpenUrl(item.other_down_url)">{{item.other_down_url==''?'':'修改器下载'}}</div>
                  </el-col>
                  <el-col :span="8">
                    <div class="btn" style="float:right;" @click="handleOpenUrl(item.down_url)">立即下载</div>
                  </el-col>
                </el-row>
              </div>
            </el-col>
          </el-row>
        </el-card>
      </div>
    </div>
  </div>
</template>
<script>
import highLevel from "../../../modules/high_level";
export default {
  name: "integral_exchange",
  props: {
    list: {
      type: Object,
      default: []
    },
    headShow: {
      type: Boolean,
      default: true
    }
  },
  data() {
    return {
      currentGoodsIndex: -1,
      num: 1,
      address: "",
      addressList: []
    };
  },
  methods: {
    handleOpenUrl(url) {
      //highLevel.openUrl(url);
      this.$electron.ipcRenderer.send("add",url);
    }
  },
  mounted() {}
};
</script>
<style scoped>
.list {
  position: relative;
  width: 100%;
  line-height: 1;
  overflow: hidden;
}

.list-item {
  position: relative;
  width: 50%;
  vertical-align: top;
  display: inline-block;
}
.box-item {
  margin: 10px;
}
.box-card {
  width: 100%;
  color: #868686;
}
.goods-info {
  margin: 10px 0;
  font-size: 14px;
}
.goods-title {
  display: block;
  width: 100%;
  height: 18px;
  margin-bottom: 15px;
  line-height: 18px;
  font-size: 18px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #333;
}
.detail-text{
  cursor: pointer;
  height: 26px;
  line-height: 26px
}
.btn {
  cursor: pointer;
  text-align: center;
  width: 90px;
  height: 24px;
  line-height: 24px;
  background-position: 0 -118px;
  display: inline-block;
  color: #ff6600;
  border: #ff6600 solid 1px;
  border-radius: 3px;
}

.btn:hover {
  color: #fff;
  background-color: #ff6600;
  border: #ff6600 solid 1px;
}
.btn:active {
  color: #fff;
  background-color: #fc9048;
  border: #fc9048 solid 1px;
}
</style>


